    function showTime(){
 
        var curTime=new Date();
        //var bb=curTime.getYear()+1900+"年"+(curTime.getMonth()+1)+"月"+curTime.getDate()+"日\r";
        var bb=(curTime.getYear()<1900?(1900+curTime.getYear()):curTime.getYear())+"年"+(curTime.getMonth()+1)+"月"+curTime.getDate()+"日\r";
        bb+="星期"+'日一二三四五六'.charAt(curTime.getDay());
        document.getElementById("time").innerHTML="欢迎您！今天是"+bb;
    
    }
    function  addLoadEvent(func){
        var oldonload = window.onload;
        if(typeof window.onload != 'function'){
            window.onload = func;
        }else{
            window.onload = function(){
                oldonload();
                func();
            }
        }
    }
    addLoadEvent(showTime);